package FileTree_Composite_09;

public class FileTreeApplication {
    public static void main(String[] args) {

        Directory root = new Directory("根目录");
        Directory dir1 = new Directory("目录一");
        Directory dir2 = new Directory("目录二");
        FileSystemNode file1 = new File("文件1.txt");
        FileSystemNode file2 = new File("文件2.txt");


        root.addChild(dir1);
        root.addChild(dir2);
        dir1.addChild(file1);
        dir2.addChild(file2);


        root.display("");
    }
}
